package com.zz.common.codeGenerator.dto;

import com.zz.common.base.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 代码生成业务表 实体类
 *
 * @author zhang.lei
 * @since 2025-08-18 20:31:13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "代码生成业务表")
public class GenTableDto extends BaseDto {

    @ApiModelProperty(value = "编号", name = "tableId")
    private String tableId;

    @ApiModelProperty(value = "表名称", name = "tableName")
    private String tableName;

    @ApiModelProperty(value = "表描述", name = "tableComment")
    private String tableComment;

    @ApiModelProperty(value = "关联子表的表名", name = "subTableName")
    private String subTableName;

    @ApiModelProperty(value = "子表关联的外键名", name = "subTableFkName")
    private String subTableFkName;

    @ApiModelProperty(value = "实体类名称", name = "className")
    private String className;

    @ApiModelProperty(value = "使用的模板（crud单表操作 tree树表操作）", name = "tplCategory")
    private String tplCategory;

    @ApiModelProperty(value = "前端模板类型（element-ui模版 element-plus模版）", name = "tplWebType")
    private String tplWebType;

    @ApiModelProperty(value = "生成包路径", name = "packageName")
    private String packageName;

    @ApiModelProperty(value = "生成模块名", name = "moduleName")
    private String moduleName;

    @ApiModelProperty(value = "生成业务名", name = "businessName")
    private String businessName;

    @ApiModelProperty(value = "生成功能名", name = "functionName")
    private String functionName;

    @ApiModelProperty(value = "生成功能作者", name = "functionAuthor")
    private String functionAuthor;

    @ApiModelProperty(value = "动态列", name = "dynamicColumn")
    private String dynamicColumn;

    @ApiModelProperty(value = "新增页类型（0弹窗、1抽屉；默认弹窗）", name = "addType")
    private String addType;

    @ApiModelProperty(value = "表单设计器类型（0基础、1高级）", name = "designerType")
    private String designerType;

    @ApiModelProperty(value = "生成代码方式（0zip压缩包 1自定义路径）", name = "genType")
    private String genType;

    @ApiModelProperty(value = "生成路径（不填默认项目路径）", name = "genPath")
    private String genPath;

    @ApiModelProperty(value = "是否支持i18n", name = "enableI18n")
    private String enableI18n;

    @ApiModelProperty(value = "是否分页（0不分 1分）", name = "isPage")
    private String isPage;

    @ApiModelProperty(value = "其它生成选项", name = "options")
    private String options;

    @ApiModelProperty(value = "创建者", name = "createBy", hidden = true)
    private String createBy;

    @ApiModelProperty(value = "创建时间", name = "createDate")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "更新者", name = "updateBy", hidden = true)
    private String updateBy;

    @ApiModelProperty(value = "更新时间", name = "updateDate")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "备注", name = "remark")
    private String remark;

    @ApiModelProperty(value = "删除标识", name = "delFlag")
    private String delFlag;

    // ================= 以下为自定义字段 =================
    public List<Date> createDateRange;
    private List<GenTableColumnDto> columns;
    private GenTableDto subTable;
    private GenTableColumnDto pkColumn;
    private Map<String, Object> params;
}
